﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Practices.Prism.Logging;
using Microsoft.Practices.Prism.MefExtensions.Modularity;
using Microsoft.Practices.Prism.Modularity;

namespace JXPlatform.Authentication
{
    [ModuleExport(typeof(ModuleAuthentication))]
    public class ModuleAuthentication : IModule
    {
        private readonly ILoggerFacade _logger;

        [ImportingConstructor]
        public ModuleAuthentication(ILoggerFacade logger)
        {
            _logger = logger;
        }

        public void Initialize()
        {
            if (_logger != null)
            {
                _logger.Log("ModuleAuthentication demonstrates logging during Initialize().", Category.Info, Priority.Medium);
            }
        }
    }
}
